<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<div class="alert bg-primary">编辑货品</div>
		<table class="table table-hover" >
			<tr class="active">
			    <th width="100">货品ID</th>
			    <?php foreach ($titleData as $t){?>
			    <th width="150"><?php echo $t['taname']?></th>
			    <?php }?>
			    <th width="200">商品库存</th>
			    <th width="300">货号</th>
			  <th width="200">操作</th>
			</tr>
			<form action="" method="post">
			<tr>
				<td>编辑货品</td>
			    <?php foreach ($titleData as $t){?>
				<td>
					<select name="combine[]" class="form-control">
						<option value="">请选择</option>
						<?php foreach ($t['value'] as $v){?>
						<option value="<?php echo $v['gavalue']?>" <?php foreach ($oldData['combine'] as $c){?><?php if($c==$v['gaid']){?>
                selected
               <?php }?><?php }?>><?php echo $v['gavalue']?></option>
						<?php }?>
					</select>
				</td>
				<?php }?>
				<td><input type="text" name="inventory" class="form-control" value="<?php echo $oldData['inventory']?>"/></td>
				<td><input type="text" name="number" class="form-control" value="<?php echo $oldData['number']?>"/></td>
				<td><button class="btn btn-warning">编辑货品</button></td>
			</tr>
			<input type="hidden" name="glid" value="<?php echo $oldData['glid']?>" />
			<input type="hidden" name="shop_goods_gid"  value="<?php echo $oldData['shop_goods_gid']?>" />
			</form>
		</table>
	</body>
</html>
